<?php

header('Content-type: text/css');


define('SHOPUPGRADED_IGNORE_WHOS_ONLINE', true);

require('includes/application_top.php');

header('Content-type: text/css');

  $template_dir = "";
  $sql = "select template_dir, template_overlay
            from " . TABLE_TEMPLATE_SELECT . "
            where template_language = 1";
  $template_query = $db->Execute($sql);
  $template_overlay = $template_query->fields['template_overlay'];
  $template_dir = $template_query->fields['template_dir'];;

  $sql = "select template_dir, template_overlay
            from " . TABLE_TEMPLATE_SELECT . "
            where template_language = '" . $_SESSION['languages_id'] . "'";
  $template_query = $db->Execute($sql);

  if ($template_query->RecordCount() > 0) {
    $template_overlay = $template_query->fields['template_overlay'];
    $template_dir = $template_query->fields['template_dir'];;
  }

foreach(array('jquery-ui.css', 'jquery-ui-1.7.2.custom.css') as $css_file){
  $css_inc = 'includes/jquery/overlays/'.$template_overlay.'/'.$css_file ;
  if(file_exists('includes/jquery/overlays/'.$template_overlay.'/'.$css_file)){
  print '
@import "'.$css_inc.'";';
}
}

if(defined('SHOPUPGRADED_MAIN_WRAPPER_WIDTH')){
  print '
#mainWrapper{width: '.SHOPUPGRADED_MAIN_WRAPPER_WIDTH.';}';
}else{
  print '
#mainWrapper{width: 960px;}';
}


if (file_exists('includes/templates/'.$template_dir.'/css/background-font-fix.php')){
  include('includes/templates/'.$template_dir.'/css/background-font-fix.php');
}

